﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace FazaDemo.PL.Mapping
{
    class CharEnumConvertWorkerFactory : ICharEnumConvertWorkerFactory
    {
        public ICharEnumSelectItemsConvertWorker Create(char? typeSymb)
        {
            if (typeSymb == 'C')
            {
                return new TextCharEnumSelectItemsConvertWorker();
            }
            if (typeSymb == 'N')
            {
                return new NumCharEnumSelectItemsConvertWorker();
            }
            if (typeSymb == 'F')
            {
                return new FloatCharEnumSelectItemsConvertWorker();
            }
            if (typeSymb == 'D')
            {
                return new DecCharEnumSelectItemsConvertWorker();
            }
            if (typeSymb == 'M')
            {
                return new MCharEnumSelectItemsConvertWorker();
            }
            return null;
        }
    }
}
